{config_load file=test.conf section="setup"}
{include file="header.tpl" title=Groups Name=Modify}

<script language="javascript">
{literal}
	function checkAll()
	{
		var inputs = document.getElementsByTagName('input');
		var checkboxes = [];
		for (var i = 0; i < inputs.length; i++) {
			if (inputs[i].type == 'checkbox' && document.getElementById("all_check").checked == true) {
			inputs[i].checked =true;
			}
			if (inputs[i].type == 'checkbox' && document.getElementById("all_check").checked == false) {
			inputs[i].checked =false;
			}
		}
	}
	function confirmAction() {
		return confirm("Are you sure you want to permanently delete this group(s)?")
	}
{/literal}
</script>

<h1>Modiry/Delete groups</h1>
<hr />
<PRE>
<form name="modify_group_form" action="removing_group.php" method="post" onsubmit="return confirmAction()">
<table border="1">
	<tr>
		<td>No</td>
		<td><input type="checkbox" name="all_check" id="all_check" onclick="checkAll()"/></td>
		<td>Group</td>
		<td>Faculty</td>
	</tr>
	{section name = i loop = $faculties}
	<tr>
		<td>{$smarty.section.i.rownum}</td>
		<td><input type="checkbox" name="check_g[]" value="{$ids[i]}" /></td>
		<td><a href="modifing_group.php?id={$ids[i]}">{$groups[i]}</a></td>
		<td>{$faculties[i]}<input type="hidden" name="old_faculty" value="{$f_id[i]}"</td>
	</tr>
	{/section}
	<tr>
		<td colspan="4" align="right"><input type="submit" name="delete" value="Delete"/></td>
	</tr>
</table>
</form>
</PRE>
<hr />
<a href="manipulate_groups.php">back</a>

{include file="footer.tpl"}